﻿<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="security" uri="http://www.enersun.com.cn/security"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/base/jsp/common/CommonListTop.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0 minimal-ui"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>南网图片库后台管理系统</title>
    <script src="${ctx}/base/js/jquery/jquery.js" type="text/javascript"></script>
    <script src="${ctx}/base/js/jquery/jquery.md5.js" type="text/javascript"></script>
    <link type="text/css" href="${ctx }/zenithsun/login/css/basic.css" rel="stylesheet">
    <link type="text/css" href="${ctx }/zenithsun/login/css/login.css" rel="stylesheet">
    <style type="text/css">
.verifyCode {
	
}
.verifyCode img {
	position: relative;
	top: 1px;
	left: 1px;
}
.verifyCode input {
	width: 180px;
	height: 30px;
	height: 30px;
}
</style>
<script type="text/javascript">
	$(function(){
	//Enter 事件提交表单
		document.onkeydown = function(e){ 
		    var ev = document.all ? window.event : e;
		    if(ev.keyCode==13) {
		    	loginVerify();
		     }
		}
	});
	//刷新验证码
	function refreshVerifyCode() {
		var href = '${ctx }/verifyCodeImage.sl?temp='
				+ (new Date().getTime().toString(36));
		document.getElementById('checkImg').src = href;
		$('#verifyCode').val('');
		return false;
	}
	function loginVerify() {
		if ($("#account").val() == '') {
			alert("请输入账号！");
			$("#account").focus();
			return;
		}
		if ($("#password").val() == '') {
			alert("请输入密码！");
			$("#password").focus();
			return;
		}
		if ($("#verifyCode").val() == '') {
			alert("请输入验证码！");
			$("#verifyCode").focus();
			return;
		}
		//密码加密后提交
		$('#password').val($.md5($('#password').val()));
		$('#login-form').submit();
	}
</script>
</head>
<body>

<!--内容模块-->
<div class="loginGrid fn-pr">
	<div class="loginMain">
		<h1 class="login-logo mb20 fn-tac"><img src="${ctx }/zenithsun/login/images/login-logo.png" alt=""/> </h1>
		<div class="loginWrap mb20">
			<form method="post" class="login-form" id="login-form" action="${ctx}/loginSys" >
				<security:CSRF/>
				<div class="loginUser mb20"></div>
				<div class="loginLine mb10">
					<div class="loginItems clearfix">
						<i class="i-user fn-fl"></i>
						<input class="login-user fn-fl" type="text" name="txt_account" id="account" value="" placeholder="请输入用户名" />
					</div>
				</div>
				<div class="loginLine mb20">
					<div class="loginItems clearfix">
						<i class="i-pwd fn-fl"></i>
						<input class="login-pwd fn-fl" type="password" name="txt_password" id="password" value="" />
					</div>
				</div>
				<div class="loginLine mb20 verifyCode">
						<input class="fn-fl" type="text" name="verifyCode" id="verifyCode" />
						<img src="${ctx }/verifyCodeImage.sl" alt="验证码" id="checkImg"
							onclick="refreshVerifyCode()" />
					</div>
				<div class="loginLine mb10">
					<input type="button" class="login-submit" onclick="loginVerify()" />
				</div>
			</form>
		</div>
		<p class="loginFooter fn-tac">Copyright © -2016 All rights reserved 南网传媒版权所有  </p>
	</div>
</div>
</body>
</html>